// 统计分析相关的mutations
export default {
  // 设置下载统计数据
  SET_DOWNLOAD_STATS(state, stats) {
    state.downloadStats = stats
  },
  
  // 设置热门包数据
  SET_POPULAR_PACKAGES(state, packages) {
    state.popularPackages = packages
  },
  
  // 设置趋势数据
  SET_TREND_DATA(state, data) {
    state.trendData = data
  },
  
  // 设置加载状态
  SET_LOADING(state, loading) {
    state.loading = loading
  },
  
  // 设置错误信息
  SET_ERROR(state, error) {
    state.error = error
  },
  
  // 设置过滤器
  SET_FILTERS(state, filters) {
    state.filters = { ...state.filters, ...filters }
  },
  
  // 清空统计数据
  CLEAR_STATS(state) {
    state.downloadStats = []
    state.popularPackages = []
    state.trendData = []
  }
}